package mest.service.MoneyFlow;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import mest.dao.MoneyFlow.PlanSaleoutMoneyDao;
import mest.entity.AccountFile;
import mest.entity.PlanSaleoutMoney;
import mest.util.NumberConst;

/**
 *@Title PlanSaleoutMoneyService.java
 *@description 销售收款计划单
 *@time 2019年12月18日 下午2:51:04
 *@author Twinson Wong
 **/
@Service
public class PlanSaleoutMoneyService {

	@Resource
	PlanSaleoutMoneyDao dao;
	
	public List<PlanSaleoutMoney> selectAll(Map<String, Object> map) {
		return dao.selectAll(map);
	}
	
	public int count(Map<String, Object> map) {
		return dao.count(map);
	}
	/**
	 * 插入要刷新流水
	 * @param map
	 * @return
	 */
	public int insert(Map<String, Object> map) {
		int order = dao.getDictionariesOrder(map);
		map.put("tableNumber", NumberConst.PlanSaleoutMoney_No + "-" + order);
		dao.insert(map);
		dao.updateDictionariesOrder(map);
		return 1;
	}

	public int update(Map<String, Object> map) {
		return dao.update(map);
	}
	
	public int delete(Map<String, Object> map) {
		return dao.delete(map);
	}
	
	public int changeStatus(Map<String, Object> map) {
		return dao.changeStatus(map);
	}
}
